package pers.sen.health.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.codingapi.txlcn.tc.annotation.LcnTransaction;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.transaction.annotation.Transactional;
import pers.sen.health.mapper.MemberMapper;
import pers.sen.health.po.Member;
import pers.sen.health.service.MemberService;

/**
 * @author Jason
 * @version 1.0.0
 * @date 2020/11/12 21:34
 * @Description TODO
 */
@Service
@Transactional
public class MemberServiceImpl extends ServiceImpl<MemberMapper, Member> implements MemberService {
    @Override
    @LcnTransaction
    public Member findMemberByTelephone(String telephone) {
        return baseMapper.findMemberByTelephone(telephone);
    }

    @Override
    @LcnTransaction
    public int saveMember(Member member) {
        save(member);
        return member.getId();
    }
}
